<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>添加商品</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label" style="width:70px;">规格名称：</label>
			<div class="layui-input-inline">
				<input type="text" name="detail_addr" id="detail_addr" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label" style="width:70px;">规格编号：</label>
			<div class="layui-input-inline">
				<input type="text" name="detail_addr" id="detail_addr" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label" style="width:70px;">是否上架：</label>
			<div class="layui-input-block" style="width:190px;">
				<input type="checkbox" name="like[write]" title="上架" checked="">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label" style="width:70px;">商品重量：</label>
			<div class="layui-input-inline">
				<input type="text" name="detail_addr" id="detail_addr" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label" style="width:70px;">其他规格：</label>
			<div class="layui-input-inline">
				<input type="text" name="detail_addr" id="detail_addr" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label" style="width:70px;">是否分单：</label>
			<div class="layui-input-block" style="width:190px;">
				<input type="checkbox" name="like[write]" title="分单">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label" style="width:70px;">规格主图：</label>
			<div class="layui-input-inline" style="width:190px;">
								<div class="layui-upload">
                                    <button type="button" class="layui-btn" id="test02">规格主图</button>
                                    <input type="hidden" class="proImg" id="proImg" name="proImg" value="proImg"/>
                                    <div class="layui-upload-list  one-img">
                                        <img class="layui-upload-img" id="demo102" width="100px" height="100px">
                                        <p id="demo1Text02"></p>
                                    </div>
                                </div>

			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label" style="width:70px;">商品组图：</label>
			<div class="layui-input-inline" style="width:504px;">
								<div class="layui-upload">
                                    <button type="button" class="layui-btn" id="test02">上传组图</button>
                                    <input type="hidden" class="proImg" id="proImg" name="proImg" value="proImg"/>
                                    <div class="layui-upload-list  one-img">
                                        <img class="layui-upload-img" id="demo102" width="100px" height="100px">
                                        <p id="demo1Text02"></p>
                                    </div>
                                </div>

			</div>
		</div>
		<table class="layui-table">
                    <thead>
                    <tr>
                        <th>产品价格</th>
                        <th>市场价格</th>
                        <th>产品成本</th>
                        <th>运营成本</th>
                        <th>购物卷</th>
                        <th>游客</th>
                        <th>会员</th>
                        <th>店主</th>
                        <th>优质店主</th>
                        <th>其他等级</th>
                        <th>最小利润</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td><input class="product-price" id="proPrice" type="text" name="proPrice" value=""></td>
                        <td><input class="product-price" id="proMarketPrice" type="text" name="proMarketPrice" value="">
                        </td>
                        <td><input class="product-price" id="proCost" type="text" name="proCost" value=""></td>
                        <td><input class="product-price" id="oprator_cost" type="text" name="oprator_cost" value="">
                        </td>
                        <td><input class="product-price" id="coupon" type="text" name="coupon" value=""></td>
                        <td><input class="product-price" id="visitor" type="text" name="visitor" value=""></td>
                        <td><input class="product-price" id="huiYuan" type="text" name="huiYuan" value=""></td>
                        <td><input class="product-price" id="dianZhu" type="text" name="dianZhu" value=""></td>
                        <td><input class="product-price" id="YZDianZhu" type="text" name="YZDianZhu" value=""></td>
                        <td><input class="product-price" id="otherRank" type="text" name="otherRank" value="0"></td>
                        <td><input class="product-price" id="minLiRun" type="text" name="minLiRun" value=""></td>
                    </tr>
                    </tbody>
                </table>

  </div>
</div>
<style>
.product-price {
    width: 50px;
    border: none;
}
</style>

<script src="/layui/layui.js"></script>
<script>
    layui.config({
        base: '/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form'], function(){
        var $ = layui.$
            ,form = layui.form ;
    })
	
	function WinOpenShow(u,t,w,h) {
        layer.open({
            type: 2
            , title: t
            , content: u
            , area: [w+'px', h+'px']
        });
    }
	
	function WinOpenAdd(u,t) {
        layer.open({
            type: 2
            , title: t
            , content: u
            , area: ['500px', '700px']
            , btn: ['确定', '取消']
            , yes: function (index, layero) {
                debugger;
                /*
				var body = layer.getChildFrame('body', index); //得到iframe页的body内容
                var userName = body.find("#userName").val();
                var phone = body.find("#phone").val();
                var cardId = body.find("#cardId").val();
                var recommend = body.find("#recommend").val();
                var sort = body.find("#sort").val();

                var addUrl="/user/addUser?userName="+userName+"&phone="+phone+"&cardId="+cardId+"&recommend="+recommend+"&sort="+sort;
                alert(addUrl);
                // var htmlobj=$.ajax({url:addUrl,async:false});
                alert(htmlobj);
                //数据刷新
                var demoReload = $('#demoReload');
                //执行重载
                table.reload('testReload', {
                });
*/
                layer.close(index); //关闭弹层
            }
        });
    }
	
</script>
</body>
</html>